package main

import "fmt"

/**
 * @author: SuZhiXiaoWei
 * @DateTime: 2022/2/21 9:08
 **/
func main(){
	chain := NewChain([]byte("创世区块"))
	fmt.Println("第一个区块的值为：",string(chain.Blocks[0].Data))
	fmt.Println("第一个区块的随机数为：",chain.Blocks[0].Nonce)
	//block := NewBlock([]byte("hello"), nil)
	//fmt.Println(block.)
	//newBlock := NewBlock([]byte("sdafadsf"), block.Data)
	//fmt.Println(block.Honce)
	//chain.AddBlockChain(block.Data)
	//chain.AddBlockChain(newBlock.Data)
	//fmt.Println("第个区块名称："+string(chain.Blocks[0].Data))
	//for i := 0 ; i <len(chain.Blocks) ; i++{
	//	fmt.Println("第",i+1,"个区块名称："+string(chain.Blocks[i].Data))
	//}
}

